package org.example.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

//springmvc配置类，本质上还是一个spring配置类
/**
 *
 * 所以如果不把@ComponentScan注释掉，
 * Spring配置类将Controller排除，
 * 但是因为扫描到SpringMVC的配置类，
 * 又将其加载回来，演示的效果就出不来
 *
 * */
@Configuration
@ComponentScan({"org.example.controller","org.example.config"})
@EnableWebMvc //开启json注解
public class SpringMvcConfig extends WebMvcConfigurationSupport {
}
